#include"grid.h"

//constructor
grid::grid(){
	tipe=0;
	direction=0;
}

grid::grid(int s){
	tipe=s;
	direction=0;
}

//constructor untuk yang tipe 2
grid::grid(int s,int dir){ 
	tipe=s;
	direction=dir;
}

grid::grid(const grid& g){
	tipe=g.tipe;
	direction=g.direction;
}

grid& grid::operator= (const grid g)
{	
	tipe=g.tipe;
	direction=g.direction;
	return *this;
}

//destructor
grid::~grid(){
	tipe=0;
	direction=0;
}

//fungsi
int grid::getTipe(){
	return tipe;
}

void grid::setTipe(int ty){
	tipe=ty;
}

int grid::getDir(){
	return direction;
}

void grid::setDir(int dir){
	direction=dir;
	//cout<<"setdir "<<direction<<endl;
}
